Do not remove or add elements to a collection in a foreach loop. Please use Iterator to remove an item. Iterator object should be synchronized when executing concurrent operations.
<p>Examples:</p>
<pre>
    Negative example:
    List<String> originList = new ArrayList<String>();
    originList.add("22");
    for (String item : originList) {
      //warn
      list.add("bb");
    }

    Positive example:
    Iterator<Integer> it=b.iterator();
    while(it.hasNext()){
    Integer temp =  it.next();
        if (delCondition) {
          it.remove();
        }
    }
</pre>